data segment
    pro1 db 10, 13, 'Please input a number: $', 0
    pro2 db 10, 13, 'Please input another number: $', 0

    rere db 10, 13, 'The sum of them: $', 0

    num1 db 0
    num2 db 0
    sum db 0

    buffer db 4 dup(0)

    newline db 13, 10, '$' ; save a newline

data ends

code segment
    assume cs:code ds:data

start:
    mov ax, data
    mov ds, ax ;把数据段存到它应该待的地方：ds寄存器
    
    mov dx, offset pro1
    call print_string

    call get_number
    mov num1, al

    mov dx, offset pro2
    call print_string

    call get_number
    mov num2, al
    ;上面是两个提示与两个输入，都是调用的子程序

    mov al, num1
    add al, num2
    mov sum, al

    mov dx, offset rere
    call print_string

    mov dx, offset newline
    call print_string

    mov ah, 01h
    int 21h

    mov ax, 4c00h
    int 21h

;下面是子程序
;description
print_string PROC
    mov si, 0
    mov bx, 0
    
print_string ENDP